package com.bom.boot.easy.entity;

import com.bom.boot.easy.core.comment.Comment;
import com.bom.core.util.entity.AbstractUserEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.Nationalized;
import org.hibernate.annotations.NaturalId;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.MappedSuperclass;

@EqualsAndHashCode(callSuper = true)
@Data
@MappedSuperclass
@Entity(name="core_user")
@Comment("用户表")
public class UserEntity extends AbstractUserEntity<String,Integer> {
    @Id
    private String id;

    @NaturalId
    @Comment("用户名")
    private String username;

    @Comment("密码")
    private String pwd;

    @Lob
    @Nationalized
    @Comment("base64的头部照片")
    private String header;
}
